<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>basic vue simulate</title>
</head>
<body>
  <div id="app">
    <h1>差值表达式</h1>
    <h3>{{msg}}</h3>
    <h3>{{count}}</h3>
    <h1>v-text</h1>
    <div v-text="msg"></div>
    <h1>v-model</h1>
    <input type="text" v-model="msg"/>
    <input type="text" v-model="count"/>
    <h1>v-html</h1>
    <p v-html="html"></p>
    <button v-on:click="click">可点击</button>
  </div>
  <script src="./lib/dep.js"></script>
  <script src="./lib/watcher.js"></script>
  <script src="./lib/compiler.js"></script>
  <script src="./lib/observer.js"></script>
  <script src="./lib/vue.js"></script>
  <script>
    let vm = new Vue({
      el:'#app',
      data:{
        msg:'Hello Vue',
        count:100,
        person:{ name:'张三', age:18 },
        html: '<span style="color: red">v-html动态渲染的任意 HTML ,容易导致 XSS 攻击</span>'
      },
      methods:{
        click(e){
          console.log('触发了点击事件',e)
        }
      }
    })
  </script>
</body>
</html>